#include "StdAfx.h"
#include "GUIFile.h"

CGUIFile::CGUIFile(void)
{
}

CGUIFile::~CGUIFile(void)
{
}

bool CGUIFile::Open(LPCWSTR strFile)
{

	m_hFlie = CreateFile(strFile,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 
	if(m_hFlie == INVALID_HANDLE_VALUE) 
	{ 
		return FALSE; 
	} 

}
bool CGUIFile::Close()
{
    return CloseHandle(m_hFlie);

}


UINT CGUIFile::Read(void* lpBuf, UINT nCount)
{
     DWORD dwRead = 0; 
	ReadFile(m_hFlie,lpBuf,nCount,&dwRead,NULL); 
	return dwRead;

}
void CGUIFile::Write(const void* lpBuf, UINT nCount)
{
	DWORD dwWrite = 0; 
	WriteFile(m_hFlie,lpBuf,nCount,&dwWrite,NULL); 

}